package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.dubbo.api.db.ProblemApi;
import com.tanhua.dubbo.api.mapper.ProblemMapper;
import com.tanhua.model.db.Problem;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author lamy
 * @version 1.0
 * @ClassName: ProblemApiImpl
 * @date 2021-12-26 21:43:21
 */
//问题API实现类
@DubboService
public class ProblemApiImpl implements ProblemApi {
    @Autowired
    private ProblemMapper problemMapper;
    //根据问卷的id查询该问卷对应的问题
    @Override
    public Problem findAll(Long id) {
        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id",id);
        return problemMapper.selectOne(queryWrapper);
    }
}
